package ch.sfug.anim {
	import flash.events.EventDispatcher;
	
	import ch.sfug.events.TweenEvent;
	import ch.sfug.sequence.EventAwait;
	import ch.sfug.sequence.FunctionCall;		

	/**
	 * @author Administrator
	 */
	public class AnimationSequenceChild extends EventAwait {

		private var anim:IAnimation;

		public function AnimationSequenceChild( anim:IAnimation, func:String = "start" ) {
			super( EventDispatcher( anim ), TweenEvent.TWEEN_END, new FunctionCall( anim, func ) );
			this.anim = anim;
		}

		public override function stop():void {
			anim.stop();
		}
	}
}
